#include "projectmodel.h"

ProjectModel::ProjectModel(QObject* parent)
: QAbstractItemModel(parent)
{
}

ProjectModel::~ProjectModel()
{
}

int ProjectModel::columnCount ( const QModelIndex & parent = QModelIndex() ) const
{
  return 0;
}

QModelIndex QAbstractItemModel::createIndex ( int row, int column, void * ptr) const
{
  QModelIndex* pIndex = new QModelIndex(row, column, ptr, this);

  return pIndex;
}

QVariant ProjectModel::data ( const QModelIndex & index, int role = Qt::DisplayRole ) const
{
  QString* pKey = (QString*)index.internalPointer();
  QMap<QString, QVariant>::const_iterator it = m_projectData.find(*pKey);
  QVariant res(false);

  if ( it != m_projectData.end() )
    res = m_projectData[*pKey];

  return res;
}

Qt::ItemFlags ProjectModel::flags ( const QModelIndex & index ) const
{
  return Qt::ItemIsSelectable | Qt::ItemIsEditable | Qt::ItemIsEnabled;
}

QModelIndex ProjectModel::index ( int row, int column, const QModelIndex & parent ) const
{
}

QModelIndex ProjectModel::parent ( const QModelIndex & index )
{
}

int ProjectModel::rowCount ( const QModelIndex & parent ) const
{
}

bool ProjectModel::setData ( const QModelIndex & index, const QVariant & value, int role )
{
}

bool ProjectModel::submit()
{
}
